package com.gupao.rpc.protocol.spring.service;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.net.UnknownHostException;

@Configuration
@EnableConfigurationProperties({RpcServerProperties.class})
public class RpcServerAutoConfiguration {

    @Bean
    public SpringRpcProviderBean springRpcProviderBean(RpcServerProperties properties) throws UnknownHostException {
        return new SpringRpcProviderBean(properties);
    }

}
